// less编写style
*{
    margin: 0;
    padding: 0;

    box-sizing: border-box;//设置计算方式
}

@len:10px;

.main{
    background-color: #b7d4a8;
    width: 360px;
    height: 420px;
    margin: 100px auto;
    border: 10px solid black;
    border-radius: 20px;
    display: flex;
    flex-direction: column;//纵轴
    justify-content: space-around;
    align-items: center;
    .stage{
        width: 304px;
        height: 304px;
        border: 2px solid black;
        position: relative;

        //贪吃蛇的身体布局
        .snake{
           &>div{
            position: absolute;
            width: @len;
            height:@len;
            background-color: black;
            border: 1px solid #b7d4a8;
           }
        }

        .food{
            position: absolute;
            display: flex;
            top: 30px;
            left: 100px;
            width: @len;
            height: @len;
            flex-wrap: wrap; //是否支持换行
            justify-content: space-around;
            &>div{
                width: 4px;
                height: 4px;
                background-color: black;
                border-radius: 3px;
            }
        }
    }
    .store{
        display: flex;
        color: black;
        font-size: 20px;
        font-weight: bold;
        width: 300px;
        justify-content: space-between;
    }
}